//用于显示添加班级成员的选择Grid的win
var chooseClassesMemberAddGridWin=Ext.create('Ext.window.Window', {
    title:'添加班级成员',
    height: 350,
    width: 450,
    layout: 'fit',
    items: [chooseClassesMemberAddGrid],
    closeAction: 'hide',// 防止窗体被销毁
    buttons:[{
        text:'确认',
        itemId:'sureButton',
        listeners:[{
            click:function(){
                var selectArray=chooseClassesMemberAddGridCheckBox.getSelection();
                var isExit=false;
                for(var i=0,length=selectArray.length;i<length;i++){
                    var exit=classesMemberGridStore.query('id',selectArray[0].data.id);
                    if(exit.length>0){
                        isExit=true;
                        break;
                    }
                }
                if(isExit)
                    Ext.Msg.alert("Error", "此班级成员已经存在！");
                else{
                    var newRecordArray=new Array();
                    Ext.each(selectArray,function(item){
                        var newRecord={
                            id:item.data.id,
                            name:item.data.realName
                        };
                        newRecordArray.push(newRecord);
                    });
                    classesMemberGridStore.add(newRecordArray);
                }
            }
        }]
    }]
});

//用于显示班级负责人的选择Grid的win
var classesChooseClassesCreaterGridWin=Ext.create('Ext.window.Window', {
    title:'选择负责人',
    height: 350,
    width: 450,
    layout: 'fit',
    items: [classesChooseClassesCreaterGrid],
    closeAction: 'hide'// 防止窗体被销毁
});